on showProgress wdID,wdName,objNo,objName,objValue
global pList,ifBackground,windowName,theProgress,theDialog,stackOpen,theSplash
if objValue="idle" then
if wsGet(wdName,3,Visible) = TRUE then
get wsGet(wdName,3,VALUE)
if it=0 then
set cursor to 4
wsSet wdName,3,"Value",10
wsSet theSplash,"2","TEXT","Checking Bit Depth..."
else if it=10 then
set cursor to 4
checkBitDepth
wsSet theSplash,3,"Value",20
wsSet theSplash,2,"Text","Locating files..."
else if it=20 then
set cursor to 4
wsSet theSplash,3,"Value",30
wsSet theSplash,2,"Text","Locating files... OK"
listDir
else if it=30 then
set cursor to 4
wsSet theSplash,3,"Value",40
wsSet theSplash,2,"Text","Creating menus..."
createMenu
else if it=40 then
set cursor to 4
wsSet theSplash,3,"Value",50
wsSet theSplash,2,"Text","Adding menu items..."
makeAbout
else if it=50 then
set cursor to 4
wsSet theSplash,3,"Value",60
wsSet theSplash,2,"Text","Checking sound..."
checkSnd
else if it=60 then
set cursor to 4
wsSet theSplash,3,"Value",70
get checkmark of menuitem "Sound" of menu "ArisΓäó"
wsSet theSplash,2,"Text","Checking sound..." && it
checkInfo
else if it=70 then
set cursor to 4
wsSet theSplash,3,"Value",80
wsSet theSplash,2,"Text","Creating Palette..."
createPalette
else if it=80 then
set cursor to 4
wsSet theSplash,3,"Value",90
wsSet theSplash,2,"Text","Getting first picture..."
put line 1 of pList into windowName
else if it=90 then
set cursor to 4
wsSet theSplash,3,"Value",95
wsSet theSplash,2,"Text","Getting first picture..." && windowName
else if it=95 then
set cursor to 4
wsSet theSplash,3,"Value",100
else if it=100 then
set cursor to 4
wsSend theSplash,0,"close"
end if
end if
end if
end showProgress
on getPreviews
-- Movie Picker window
global myRefNumber,MooVfileName,MooVList,HideAndPlay
if HideAndPlay = "" then put "Auto Close TRUE" into HideAndPlay
if there is not a window "Movie Picker" then
checkColor
put locateF() & "Data:" & discName() & ".Resources" into MooVfileName
if isFile(MooVfileName) Γëá TRUE then
put thisPath() & discName() & ".Resources" into MooVfileName
end if
if isFile(MooVfileName) and the optionKey = UP then
get windowScript("Movie Picker" & return & "i27_Name:" & HideAndPlay)
put ResourceList(MooVfileName,"PICT","Name") into MooVList
if MooVList Γëá "" and the optionKey = UP then
put resFilOpen(MooVfileName) into myRefNumber
put empty into resList1
repeat with i = 2 to 26
set cursor to busy
put "i" & i & "_Name:" & (line (i-1) of MooVList) & return after resList1
end repeat
set the properties of window "Movie Picker" to resList1
else if MooVList = empty and the optionKey = UP then
put GetDir(locateF() & "Movies:","F","o=n") into MooVList
repeat with i = 2 to 26
set cursor to busy
put "i" & i & "_Name:sm Projector" & return & "i" & (i+29) & "_Text:" & (line (i-1) of MooVList) & return & "i" & (i+29) & "_Visible:TRUE" & return after resList1
end repeat
set the properties of window "Movie Picker" to resList1
end if
else if isFile(MooVfileName) and MoovList Γëá "" and the optionKey = DOWN then
get windowScript("Movie Picker" & return & "i27_Name:" & HideAndPlay)
put GetDir(locateF() & "Movies:","F","o=n") into MooVList
repeat with i = 2 to 26
set cursor to busy
put "i" & i & "_Name:sm Projector" & return & "i" & (i+29) & "_Text:" & (line (i-1) of MooVList) & return & "i" & (i+29) & "_Visible:TRUE" & return after resList1
end repeat
set the properties of window "Movie Picker" to resList1
else if the optionKey = DOWN then
if there is a window "Movie Picker" then close window "Movie Picker"
send BuildListOfPICTs to background
else
get windowScript("Movie Picker" & return & "i27_Name:" & HideAndPlay)
put GetDir(locateF() & "Movies:","F","o=n") into MooVList
repeat with i = 2 to 26
set cursor to busy
put "i" & i & "_Name:sm Projector" & return & "i" & (i+29) & "_Text:" & (line (i-1) of MooVList) & return & "i" & (i+29) & "_Visible:TRUE" & return after resList1
end repeat
set the properties of window "Movie Picker" to resList1
end if
end if
end getPreviews
on BuildListOfPICTs
global targetfolder,destFileName
get FolderPath("Select a Folder that you wish to get Movie Previews from...")
put it into targetfolder
if targetfolder Γëá empty then
answer file "Please locate the" && discName() & ".Resources file to save previews into..."
put it into destFileName
if destFileName Γëá empty then
open file destfilename
close file destfilename
put changeFileType(destfilename,"rsrc","RSED") into smChange
put GetDir(targetfolder,"F","o=n") into DirList
put ChangeStr(DirList,"[44]",",","all") into DirList
repeat with i = 1 to number of lines of DirList
put "Copying preview from:" && (line i of DirList)
put ResourceList(targetfolder & (line i of DirList),"PICT","ID") into PictNo
if PictNo = "" then
PICTToClip (targetfolder & line i of DirList)
ClipToPICT destFileName,"res",(line i of DirList),(i+999),"80,60"
else
CopyRes targetfolder & (line i of DirList),destFileName,"PICT",PictNo,"I"
put last item of the result into newNum
put ResFilOpen(destfilename) into myRefNum
get (line i of DirList)
resRename "PICT",newNum,it
ResFilClose myRefNum
end if
end repeat
put empty
hide msg
answer "Movie Previews copied successfully."&return&return&"To use the Movie Picker with these resources, keep them in the same folder as this stack or in the ΓÇ£DATAΓÇ¥ folder."
else exit BuildListOfPICTs
else exit BuildListOfPICTs
end BuildListOfPICTs
on BuildListOfICNs
global targetfolder,destFileName
get FolderPath("Select a Folder to get icons from..."&return&"(The 24-Bit Folder looks best.)")
put it into targetfolder
if targetfolder Γëá empty then
ask file "Save icons into..." with discName() & ".Resources"
put it into destFileName
if destFileName Γëá empty then
open file destfilename
put GetDir(targetfolder,"F","o=n") into DirList
put ChangeStr(DirList,"[44]",",","all") into DirList
repeat with i = 1 to number of lines of DirList
put "Copying color icon from:" && (line i of DirList)
CopyRes targetfolder & (line i of DirList),destFileName,"ICN#","-16455","I"
put last item of the result into newNum
put ResFilOpen(destfilename) into myRefNum
get (line i of DirList)
resRename "ICN#",newNum,it
CopyRes targetfolder & (line i of DirList),destFileName,"icl8","-16455","I"
put last item of the result into newNum
get (line i of DirList)
resRename "icl8",newNum,it
ResFilClose myRefNum
end repeat
close file destfilename
put changeFileType(destfilename,"rsrc","RSED") into smChange
put empty
hide msg
answer "Color icons copied successfully."&return&return&"To use the Picture Picker with these resources, keep them in the same folder as this stack or in the ΓÇ£DATAΓÇ¥ folder."
else exit BuildListOfICNs
else exit BuildListOfICNs
end BuildListOfICNs
on findPICTname x
global hitPath, startChar, howFarDown, aFoundLine, lineNo, searchMe
put locateF() & "data:aris.data" into fileName
open file fileName
read from file fileName until "Γëê"
close file fileName
repeat with i = 1 to the number of lines in it
put word 1 of line i of it into item i of xTractor
end repeat
put item howFarDown of aFoundLine into lineNo
get line lineNo of searchMe
repeat with i = 1 to the number of items in xTractor
if it contains (item i of xTractor) then
put line lineNo - i + 1 to lineNo - i + 5 of searchMe into hitPath